import 'package:flutter/material.dart';
import 'package:oktoast/oktoast.dart';

class ToastUtils {
  ToastUtils._internal();

  static void show(
    String msg, {
    int duration = 1500,
    EdgeInsetsGeometry textPadding = const EdgeInsets.fromLTRB(12, 8, 12, 8),
    TextStyle textStyle = const TextStyle(fontSize: 14, color: Colors.white),
    TextAlign textAlign = TextAlign.center,
    Color backgroundColor = const Color(0xCC111A34),
    double radius = 8,
  }) {
    showToast(
      msg,
      duration: Duration(milliseconds: duration),
      textPadding: textPadding,
      textStyle: textStyle,
      textAlign: textAlign,
      backgroundColor: backgroundColor,
      radius: 8,
    );
  }

  static void showShort(String msg) {
    show(msg);
  }

  static void showLong(String msg) {
    show(msg, duration: 3000);
  }
}
